package com.ucampus.controller;

import com.ucampus.entity.SearchResult;
import com.ucampus.service.oS_searchService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 功能：
 * 作者： 启明星_Polaris
 * 日期：2025/1/7 下午2:26
 **/

@RestController
@RequestMapping("/search")
public class oS_searchController {

    @Resource
    private oS_searchService searchService;

    @GetMapping("/keyword")
    public List<SearchResult> searchByKeyword(@RequestParam String keyword) {
        return searchService.searchByKeyword(keyword);
    }
}
